#ifndef PAOPAOTANG_H
#define PAOPAOTANG_H

#include <QMainWindow>

QT_BEGIN_NAMESPACE
namespace Ui { class paopaotang; }
QT_END_NAMESPACE

class paopaotang : public QMainWindow
{
    Q_OBJECT

public:
    paopaotang(QWidget *parent = nullptr);
    ~paopaotang();
    void paintEvent(QPaintEvent *event);
        void Initperson1();
        void Initperson2();
        void Initboom1();
        void Initboom2();
        void Initobb();
        void keyPressEvent(QKeyEvent* event);
        void keyReleaseEvent(QKeyEvent* event);
        QList<int>keys;
private slots:
    void uupdate();
    void chucun();//炸弹储存
    void disapp1();//炸弹消失
    void disapp2();
    void disapp3();
    void disapp4();
    void disapp5();
    void disapp6();
    void zharen1();
    void zharen2();
    void zharen3();
    void zharen4();
    void zharen5();
    void zharen6();
private:
    Ui::paopaotang *ui;
    QRect vperson1;
    QRect vperson2;
    QRect boom[3];
    QRect boom1[3];
    QRect tx1, tx2, tx3, tx4, tx5, tx6, tx7, tx8, tx9, tx10, tx11, tx12;
    bool a[3];//代表炸弹的空位
    bool b[3];
    bool cz1[3];//代表扔出去的炸弹是否绘制
    bool cz2[3];
    bool h, i, j, k, l, o;//爆炸特效
    QTimer* sj, * sjj, * sj1, * sj2, * sj3, * sj4, * sj5, * sj6,*sjs1,*sjs2,*sjs3,*sjs4,*sjs5,*sjs6;//定时器
    int D1;//1P运动方向
    int D2;//2P运动方向
    bool blsRun;//是否开始
    bool blsover;//是否结束
    QString Display;
    QVector<QRect> Ob1;
    QVector<QRect> Ob2;
    QVector<QRect> Ob3;
    QVector<QRect> Ob4;
    QVector<QRect> Ob5;
    QVector<QRect> Ob6;
    QVector<QRect> Ob7;
    QVector<QRect> Ob8;
    QVector<QRect> Ob9;
    QVector<QRect> Ob10;
    QVector<QRect> Ob11;
    QVector<QRect> Ob12;
    QVector<QRect> Ob13;
    QVector<QRect> Ob14;
    QVector<QRect> Ob15;
};
#endif // PAOPAOTANG_H
